package com.imti.mall.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.imti.mall.model.cms.pojo.CmsSubjectProductRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CmsSubjectProductRelationDao extends BaseMapper<CmsSubjectProductRelation> {
    /**
     * 根据商品id查询专题商品关系表
     * @param productId
     * @return
     */
    @Select("SELECT id,subject_id,product_id FROM `cms_subject_product_relation` WHERE product_id=#{productId}")
    public List<CmsSubjectProductRelation> getCmsSubjectProductRelationProductId(Integer productId);

}
